Overview
| Oracle® OLAP Java API Reference 10g Release 2 (10.2) B14348-02

# What's New in 10.2.0.2

The features of the Oracle OLAP Java API that are new in Oracle OLAP 10g Release 2 (10.2.0.2) are the following:

- NumberSource.positionalPeriodsAgo

## Introducing the NumberSource.positionalPeriodsAgo Method

The `NumberSource.positionalPeriodsAgo(MdmLevelHierarchy hierarchy, MdmLevel offsetLevel, int offset)` method selects the elements of the `NumberSource` for an `MdmMeasure` at positions offset from the elements specified by members of a level of a hierarchy of a time dimension. This method is similar to the `lead` or `lag` methods, except that it does not expect that the time hierarchy is based on a Gregorian calendar.

If the value of the `offset` parameter is positive, then this method functions like the `lag` method. If the `offset` value is negative, then this method functions like the `lead` method.

# What's New in 10.2.0.1

The new features of the Oracle OLAP Java API in Oracle OLAP 10g Release 2 (10.2.0.1) are the following:

- Custom dimension members

- Model objects

- Placeholder Source objects

- Characteristics of an ExpressDataProvider

For a list of the new classes in the OLAP Java API, see New OLAP Java API Classes.

For a list of classes that have new methods, see Classes With New Methods.

For a list of the new example programs in this release, see New Example Programs.

## Introducing Custom Dimension Members

The Oracle OLAP Java API now supports the creation of custom dimension members, which are virtual members that you can use in specifying a query. When you create a custom dimension member, you provide a `Source` that supplies a value for a measure or attribute that is dimensioned by the custom member. The value that the `Source` supplies can be the result of a calculation that uses the measure or attribute values specified by other dimension members.

Custom dimension members are instances of the classes that implement the new `MdmMember` interface. You can create a custom member for an `MdmStandardDimension`, an `MdmTimeDimension`, or an `MdmMeasureDimension`. To create a custom member, you use methods of an `MdmCustomObjectFactory` or convenience methods on the dimension objects.

In implementing custom dimension members, Oracle OLAP uses `Model` objects, which are another new feature of the API. A custom member has an associated `MdmModel`, which is an implementation of the `Model` interface. The `MdmModel` assigns the value specified by the custom member to the object dimensioned by the member.

## Introducing the OLAP Java API Model

An OLAP Java API `Model` represents a set of assignments that apply to a `Source`. An assignment specifies a value and a set of `Source` elements. An assignment of a `Model` is represented by an `Assignment` object. The set of `Source` elements for which the `Model` assigns a value is represented by one or more `Qualification` objects.

The `MdmModel` class and its subclasses implement the `Model` interface for `MdmObject` objects. The `CustomModel` class implements the interface for an object that you can explicitly create and that is not necessarily associated with an `MdmObject`. For more information, see the Model interface.

## Introducing the Placeholder Source

Because the calculations specified by the `Assignment` objects of a `Model` can apply to any `Source` that has the same inputs as the `Model`, the OLAP Java API requires a way to represent the `Source` to which Oracle OLAP is currently applying the `Model`. The role of representing the current dimensioned `Source` is taken by a placeholder `Source`, which is a new type of `Source`.

The OLAP Java API has placeholder `Source` objects for the different data types. You get a placeholder `Source` by first getting a `FundamentalMetadataObject` object for a placeholder of a specific data type from your `FundamentalMetadataProvider`. You then call the `getSource` method of the `FundamentalMetadataObject`.

## Specifying Characteristics of an ExpressDataProvider

With new constructors of the `ExpressDataProvider` class, you can now specify certain characteristics when creating an `ExpressDataProvider`. By passing in a `java.util.Locale` object to a constructor, you create an `ExpressDataProvider` that provides the `String` objects of an analytic workspace in the language specified by a `Locale` object. By passing in a `java.util.Properties` object, you create an `ExpressDataProvider` that has the specified properties. For an explanation of those properties, see the description of the `ExpressDataProvider` class.

## New OLAP Java API Classes

This section describes the new classes in the OLAP Java API.

### New Classes in the oracle.olap.data.source Package

The following table lists the new classes in the `oracle.olapi.data.source` package and provides brief descriptions of them.

Class | Description
--- | ---
`Model` | An interface for an object that contains `Assignment` objects. This interface is implemented by the `MdmModel` and `CustomModel` classes.
`CustomModel` | A `Model` that an application can explicitly create.
`Assignment` | A class that contains one or more `Qualification` objects and a `Source` that Oracle OLAP uses to calculate a value to assign.
`Qualification` | An abstract class that represents an element of a `Source` for an `Assignment` of a `Model`. A `Qualification` identifies the element of an input `Source` to which the `Assignment` applies.
`LiteralQualification` | A concrete class that extends `Qualification` and that represents a literal value that identifies an element of an input `Source`, such as a member of a dimension.
`ModelSolutionDefinition` | A `SourceDefinition` that has information about solving a `CustomModel`.
`PlaceholderDefinition` | A `SourceDefinition` for a placeholder `Source`.

### New Classes in the oracle.olap.metadata.mdm Package

The following table lists the new classes in the `oracle.olapi.metadata.mdm` package and provides brief descriptions of them.

Class | Description
--- | ---
`MdmModel` | An abstract class that implements the `Model` interface for `MdmObject` objects.
`MdmDimensionCalculationModel` | An `MdmModel` of a specific data type for an `MdmPrimaryDimension`.
`MdmDimensionedObjectModel` | An abstract class that extends `MdmModel` for dimensioned objects.
`MdmAttributeModel` | An `MdmDimensionedObjectModel` for `MdmAttribute` objects.
`MdmMeasureModel` | An `MdmDimensionedObjectModel` for `MdmMeasure` objects.
`MdmMember` | An interface for a custom dimension member.
`MdmStandardMember` | An implementation of `MdmMember` for an `MdmStandardDimension`.
`MdmTimeMember` | An implementation of `MdmMember` for an `MdmTimeDimension`.

## Classes With New Methods

The following classes in the `oracle.olapi.data.source` package have new factory or accessor methods related to an OLAP Java API `Model` or to custom dimension members.

- `ConstantListDefinition`

- `DataProvider`

- `FundamentalMetadataProvider`

- `Source`

- `SourceDefinition`

The following classes in the `oracle.olapi.metadata.mdm` package have new factory, accessor, or other methods related to an OLAP Java API `Model` or to custom dimension members.

- `Mdm10_1_0_3_NamingConvention`

- `Mdm10_1_0_3_ObjectVisitor`

- `MdmCustomObjectFactory`

- `MdmMeasure`

- `MdmMeasureDimension`

- `MdmPrimaryDimension`

- `MdmSource`

- `MdmStandardDimension`

- `MdmTimeDimension`

In the `oracle.express.olapi.data.full` package, the `ExpressDataProvider` class has new constructors and some of its `createCursorManager` methods take new input parameters. With these new features an application can specify a language for an analytic workspace, or specify other characteristics of the `ExpressDataProvider` or `CursorManager` objects, or both.

## New Example Programs

New example programs demonstrate the use of `Model` objects, custom dimension members, and placeholder `Source` objects. They contain the complete code for the examples that appear in Oracle OLAP Developer's Guide to the OLAP API.

The new example programs are the following:

- `CreateCustomDimensionMember.java`

- `CreateCustomMeasureDimensionMember.java`

- `ImplementingExtractAsACustomModel.java`

- `CreateDependentAssignment.java`

- `CreateCustomMemberWithAggVal.java`

- `CreateColorAttribute.java`

For information about the example programs, see the Examples of Using the OLAP Java API section in the Overview.

Copyright © 2002, 2005, Oracle. All rights reserved.